int[] a = new int[10];
int[] b = {1,2,3,4,5};
System.out.println("copy all elements of b[5] to a[10]:");
System.arraycopy(b,0,a,0,b.length);
Syste.out.println(Arrays.toString(a));
System.out.println("copy 4 elements of a[10] from index 0 to index 4:")
System.arraycopy(a,0,a,4,4);
System.out.println(Arrays.toString(a));
System.out.println("copy 3 elements of a[10] from index 0 to index 8:");
System.arraycopy(a,0,a,8,3);
System.out.println(Arrays.toString(a));